package com.easyapi.dao.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easyapi.dao.entity.user.ApiCenterRoleUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ApiCenterRoleUserMapper extends BaseMapper<ApiCenterRoleUser> {
   List<Long> getRoleIdsByUserId(@Param("userId") Long userId);

   void delRoleUserByUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);

   ApiCenterRoleUser getByUserIdAndRoleId(@Param("roleId")Long roleId,@Param("userId")Long userId);

   List<ApiCenterRoleUser> getByRoleId(@Param("roleId")Long roleId);
   void deleteByRoleId(@Param("roleId")Long roleId);
}